package jcu.sal.common.agents.netty;

/**
 * @author Marc Hammerton
 *
 */
public class NettyMessage {

	private short type;
	private Object[] data = new Object[4];
	private int counter = 0;
	
	public NettyMessage (short type) {
		this.setType(type);
	}

	/**
	 * @param type the type to set
	 */
	public void setType(short type) {
		this.type = type;
	}

	/**
	 * @return the type
	 */
	public short getType() {
		return type;
	}

	/**
	 * @param data the data to set
	 */
	public void addData(Object data) {
		this.data[counter++] = data;
	}

	/**
	 * @return the data
	 */
	public Object getData(int key) {
		return data[key];
	}

	/**
	 * @return the counter
	 */
	public int getCounter() {
		return counter;
	}
	
}
